The present invention relates in general to a memory management system. More particularly, there is described herein memory management circuitry for providing memory protection in connection with various programs running in the computer.
Many 16-bit computers presently in use, including the Radio Shack TRS-80, model 16 computer, are multi-tasking systems. In a multi-tasking system, even though only one program or "task" is run at any given time, the actual program codes for many programs are physically resident in the system memory all at the same time. This type of system enables a rapid switching from one program to another program if the presently running program is held up even for a short period of time. By way of example, the running of the program may be held up during a disc access phase of operation.
In a multi-tasking system, it is common to provide some kind of protection for each portion of the system memory in which a program code or data assigned to a particular task resides. Without this protection, system errors are apt to occur. For example, a program might insert its data into the program code of another program or a program might try to execute part of another program's data resulting in system problems.
This protection of program code or data is normally accomplished by performing a translation between the memory addresses produced by the processor (central processing unit) and the actual addresses used to address the memory. The memory spaces allotted for each program and the program's associated data are usually separated by providing a different set of translations of each program. The translations are usually performed by what is typically referred to as a memory management unit. Generally speaking, the memory management unit utilizes either a table stored in memory to perform the translations or a table internally stored in a high speed hardware memory contained in the memory management unit itself. In a typical translation operation, the addresses produced by the processor are provided to the memory management unit which then provides a translated or "physical" address to the actual memory circuitry.
Their presently exists in the art, several different schemes for providing address translation and separation of memory spaces. These different schemes vary considerably in complexity. However, the translation schemes usually involve table look-up sequences. For example, Motorola provides a memory management unit such as their type MC68451L4, 6 or 8. However, this memory management scheme is quite complex, requiring substantial circuitry. Briefly, in the Motorola system, each bus master (or processor) provides a function code and an address during each bus cycle. The function code specifies an address space and the address specifies a location within that address space. The function codes distinguish between user and supervisor spaces and, within these, between data and program spaces. This separation of address spaces provides the basis for memory management and protection by the operating system. However, once again, the circuitry that is employed with the table look-up functions is very complex.
Accordingly, it is an object of the present invention to provide an improved and simplified memory management system for providing memory protection between various programs running in the computer.
Another object of the present invention is to provide improved memory management circuitry for use in a multi-tasking computer system to provide protection for each portion of the system memory in which a program code or data assigns to a particular task resides.
Still a further object of the present invention is to provide an improved memory management system preferably for use with a 16-bit computer having multi-tasking capabilities and in which the memory management circuitry is not only simple but inexpensive and substantially trouble-free in operation.